﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MCWorldLibrary.NBT
{
    public abstract class TagPayload
    {
    }

    class BytePayload : TagPayload
    {
        public byte Value { get; private set;}

        public BytePayload(byte value)
        {
            this.Value = value;
        }
    }

    public class ShortPayload : TagPayload
    {
        public short Value { get; private set; }

        public ShortPayload(short value)
        {
            this.Value = value;
        }
    }

    public class IntPayload : TagPayload
    {
        public int Value { get; private set;}

        public IntPayload(int value)
        {
            this.Value = value;
        }
    }

    public class LongPayload : TagPayload
    {
        public long Value { get; private set; }

        public LongPayload(long value)
        {
            this.Value = value;
        }
    }

    public class FloatPayload : TagPayload
    {
        public float Value { get; private set; }

        public FloatPayload(float value)
        {
            this.Value = value;
        }
    }

    public class DoublePayload : TagPayload
    {
        public double Value { get; private set; }

        public DoublePayload(double value)
        {
            this.Value = value;
        }
    }

    public class ByteArrayPayload : TagPayload
    {
        public byte[] Value { get; set; }

        public ByteArrayPayload(byte[] value)
        {
            this.Value = value;
        }
    }

    public class StringPayload : TagPayload
    {
        public string Value { get; private set; }

        public StringPayload(string value)
        {
            this.Value = value;
        }
    }

    public class ListTagPayload : TagPayload
    {
        public TagType Type { get; set; }
        public List<TagPayload> Value { get; private set; }

        public ListTagPayload(List<TagPayload> value, TagType type)
        {
            this.Type = type;
            this.Value = value;
        }
    }

    public class CompoundTagPayload : TagPayload
    {
        public List<Tag> Value { get; private set; }

        public CompoundTagPayload(List<Tag> value)
        {
            this.Value = value;
        }
    }

    public class IntArrayPayload : TagPayload
    {
        public int[] Value { get; private set; }

        public IntArrayPayload(int[] value)
        {
            this.Value = value;
        }
    }
}
